#include<iostream>
#include<vector>
using namespace std;

void printVector(vector<int>& v){
	for(vector<int>::iterator iter=v.begin(); iter!=v.end(); iter++){
		cout<<*iter<<" ";
	}
	cout<<endl;
}


/**
 *pop_back
 */



int main(){
	vector<int> v={9,8,5,2,1,1};
	printVector(v);
	v.pop_back();
	printVector(v);


	v.erase(v.begin());
	printVector(v);

	vector<int>::iterator it=v.erase(v.begin());
	printVector(v);
	cout<<*it<<endl;

	v.clear();
	cout<<"还有吗？";
	printVector(v);
	
	

	return 0;
}
